package com.codeczx.mysimpletagimageview;

import android.content.Context;
import android.graphics.Color;
import android.util.Log;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.youth.banner.loader.ImageLoader;

/**
 * Created by win10 on 2017/4/27.
 */

public class GlideImageLoader extends ImageLoader {
    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {


        Log.i("codeczx","path:"+path);
        //Glide 加载图片简单用法
        Glide.with(context).load(path).into(imageView);

    }

    //提供createImageView 方法，如果不用可以不重写这个方法，主要是方便自定义ImageView的创建
    @Override
    public ImageView createImageView(Context context) {
        //使用fresco，需要创建它提供的ImageView，当然你也可以用自己自定义的具有图片加载功能的ImageView
//        SimpleTagImageView simpleTagImageView =new SimpleTagImageView(context);
//        simpleTagImageView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
//        simpleTagImageView.setTagWidth(20);
//        simpleTagImageView.setCornerDistance(20);
//        simpleTagImageView.setTagOrientation(SimpleTagImageView.RIGHT_TOP);
//        simpleTagImageView.setBackgroundColor(Color.YELLOW);
        TagImageView tagImageView = new TagImageView(context);
        return tagImageView;
    }
}
